package com.javacore;

import java.util.*;

public class Manager extends Employee{

    private double bonus;

    public boolean equals(Object obj){

        if (!super.equals(obj))
            return false;
        Manager other = (Manager) obj;
        return this.bonus == other.getBonus()
                && ((Manager) obj).getName().equals(super.getName());
    }



    public Manager(double salary, int year, int month, int day, String name) {
        super(salary, year, month, day, name);
        this.bonus = 0;
    }

    public int hashCode(){
        return Objects.hash(super.getName() +super.getSalary());
    }

    //重写getSalary
    public double gerSalary(){
        return super.getSalary()+bonus;
    }

    //
    public double getBonus() {
        return bonus;
    }

    public void setBonus(double b){
        this.bonus = b;
    }

    public static void main(String[] args) {

        String[] strings = "\"22797640852@qq.com\"".split("\"");

        System.out.println("\"227976\"");
        System.out.println(Arrays.toString(strings));

    }
}
